<?php
/**
 *      [迷你云] (C)2009-2012 南京恒为网络科技.
 *   软件仅供研究与学习使用，如需商用，请访问www.miniyun.cn获得授权
 * 
 */
?>
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title><?php echo Yii::app()->params["app"]["name"] ?>，我的云盘！ 爱分享 云生活</title>
<link rel="stylesheet" type="text/css" href="<?php echo(Yii::app()->params['app']['host'])?>/statics/web/setting/css/style.css?v=<?php echo(Yii::app()->params['app']['version'])?>" media="all" />
<script type="text/javascript">document.domain=window.location.host;</script>
<script src="<?php echo(Yii::app()->params['app']['host'])?>/statics/web/js/jquery_min.js?v=<?php echo(Yii::app()->params['app']['version'])?>" type="text/javascript"></script>
<script src="<?php echo(Yii::app()->params['app']['host'])?>/statics/web/js/util.js?v=<?php echo(Yii::app()->params['app']['version'])?>" type="text/javascript"></script>
<script src="<?php echo(Yii::app()->params['app']['host'])?>/statics/web/setting/js/tip.js?v=<?php echo(Yii::app()->params['app']['version'])?>" type="text/javascript"></script>
<script src="<?php echo(Yii::app()->params['app']['host'])?>/statics/web/setting/js/common_set_validate.js?v=<?php echo(Yii::app()->params['app']['version'])?>" type="text/javascript"></script>

</head>
<body>
<script type="text/javascript" src="<?php echo(Yii::app()->params['app']['host'])?>/statics/web/js/ylmf_area.js?v=<?php echo(Yii::app()->params['app']['version'])?>"></script>
<script language="javascript">
        
                        var daysnumber_date = function(DateGL) {
        return parseInt((Date.parse(DateGL)-Date.parse(DateGL.getFullYear()+"/1/1"))/86400000)+1;
    }
    var nl_date_date = function(DateGL) {
        var CnData=new Array(
        0x16,0x2a,0xda,0x00,0x83,0x49,0xb6,0x05,0x0e,0x64,0xbb,0x00,0x19,0xb2,0x5b,0x00,
        0x87,0x6a,0x57,0x04,0x12,0x75,0x2b,0x00,0x1d,0xb6,0x95,0x00,0x8a,0xad,0x55,0x02,
        0x15,0x55,0xaa,0x00,0x82,0x55,0x6c,0x07,0x0d,0xc9,0x76,0x00,0x17,0x64,0xb7,0x00,
        0x86,0xe4,0xae,0x05,0x11,0xea,0x56,0x00,0x1b,0x6d,0x2a,0x00,0x88,0x5a,0xaa,0x04,
        0x14,0xad,0x55,0x00,0x81,0xaa,0xd5,0x09,0x0b,0x52,0xea,0x00,0x16,0xa9,0x6d,0x00,
        0x84,0xa9,0x5d,0x06,0x0f,0xd4,0xae,0x00,0x1a,0xea,0x4d,0x00,0x87,0xba,0x55,0x04
    );
        var CnMonth=new Array();
        var CnMonthDays=new Array();
        var CnBeginDay;
        var LeapMonth;
        var Bytes=new Array();
        var I;
        var CnMonthData;
        var DaysCount;
        var CnDaysCount;
        var ResultMonth;
        var ResultDay;
        var yyyy=DateGL.getFullYear();
        var mm=DateGL.getMonth()+1;
        var dd=DateGL.getDate();
        if(yyyy < 100) yyyy += 1900;
        if ((yyyy < 1997) || (yyyy > 2020)){
            return 0;
        }
        Bytes[0] = CnData[(yyyy - 1997) * 4];
        Bytes[1] = CnData[(yyyy - 1997) * 4 + 1];
        Bytes[2] = CnData[(yyyy - 1997) * 4 + 2];
        Bytes[3] = CnData[(yyyy - 1997) * 4 + 3];
        if ((Bytes[0] & 0x80) != 0) { CnMonth[0] = 12; }
        else {CnMonth[0] = 11;}
        CnBeginDay = (Bytes[0] & 0x7f);
        CnMonthData = Bytes[1];
        CnMonthData = CnMonthData << 8;
        CnMonthData = CnMonthData | Bytes[2];
        LeapMonth = Bytes[3];
        for (I=15;I>=0;I--)
        {
            CnMonthDays[15 - I] = 29;
            if (((1 << I) & CnMonthData) != 0 ){CnMonthDays[15 - I]++;}
            if (CnMonth[15 - I] == LeapMonth ){CnMonth[15 - I + 1] = - LeapMonth;}
            else
            {
                if (CnMonth[15 - I] < 0 ){CnMonth[15 - I + 1] = - CnMonth[15 - I] + 1;}
                else {CnMonth[15 - I + 1] = CnMonth[15 - I] + 1;}
                if (CnMonth[15 - I + 1] > 12 ){ CnMonth[15 - I + 1] = 1;}
            }
        }
        DaysCount = daysnumber_date(DateGL) - 1;
        if (DaysCount <= (CnMonthDays[0] - CnBeginDay)){
            if ((yyyy > 1901) && (nl_date_date(new Date((yyyy - 1)+"/12/31")) < 0)){
                ResultMonth = - CnMonth[0];}
            else {ResultMonth = CnMonth[0];}
            ResultDay = CnBeginDay + DaysCount;
        }
        else
        {
            CnDaysCount = CnMonthDays[0] - CnBeginDay;
            I = 1;
            while ((CnDaysCount < DaysCount) && (CnDaysCount + CnMonthDays[I] < DaysCount)){
                CnDaysCount+= CnMonthDays[I];
                I++;
            }
            ResultMonth = CnMonth[I];
            ResultDay = DaysCount - CnDaysCount;
        }
        if (ResultMonth > 0){return ResultMonth * 100 + ResultDay;}
        else{return ResultMonth * 100 - ResultDay;}
    }
    var nl_year_date = function( DateGL ){
        var YYYY = DateGL.getFullYear();
        var MM = DateGL.getMonth()+1;
        var CnMM = parseInt( Math.abs( nl_date_date(DateGL) ) / 100);
        if(YYYY < 100) YYYY += 1900;
        if(CnMM > MM) YYYY--;
        YYYY -= 1864;
        return YYYY;
    }
    var setAnimal = function( ) {
        //var animals=new Array('鼠','牛','虎','兔','龙','蛇','马','羊','猴','鸡','狗','猪');
        var dgl = new Date();
        dgl.setFullYear($('#birthday_y').val(), $('#birthday_m').val(), $('#birthday_d').val() );
        var aid = nl_year_date( dgl ) % 12 + 1;
        $('#animal').val( aid );
    }
</script>
<div class="s-con privacy-setting dy-show back-input">
    <form method="post" action="?ct=account&ac=update_user_info&step=1" id="js_form_info" vali="1">
        <p class="border-bottom s-safe-title">
           <!-- 
        	<span class="fr">
	            <span class="til" style="margin-left:10px;">档案完整度：</span>
	            <span class="bar"><em style="width:45%"></em></span>
	            <span class="num green">45%</span>
			</span>
			 -->
			<strong>修改个人资料</strong>
        </p>

        <div class="input-label">
            <label for="" class="label-text">邮箱：</label>
            <span class="txt">tang9527@gmail.com</span>

        </div>
        <div class="input-label">
            <label for="" class="label-text">UID：</label>
            <span class="txt">8488207</span>
        </div>
        <div class="input-label">
            <label for="" class="label-text">昵称：</label>

            <input type="text" maxlength="30" class="text required ajax" name="form[user_name]" id="user_name" value="tang9530"   data-error="请输入正确的昵称!" data-ajax="?ct=account&ac=register_ajax_validate&type=user"/>
            <span class="gray" >4-30个英文、下划线或中文</span>
                    </div>
        <div class="input-label">
            <label for="" class="label-text">真实姓名：</label>
            <input type="text" class="text" name="form[name]" id="name" value="" require="0"/>
                    </div>
        <div class="input-label">

            <label for="" class="label-text">性别：</label>
            <label for="man" >男</label>
            <input id="man" name="form[gender]" type="radio" value="1" checked="checked"/>
            <label for="woman">女</label>
            <input type="radio" id="woman" name="form[gender]" value="0"  />
                    </div>
        <div class="input-label">

            <label for="" class="label-text">生日：</label>
            <!--//class="inp-sel"-->
            <select class="inp-sel"  name = 'form[y]' id = 'birthday_y' ><option value=''>请选择</option><option value='2002'>2002</option><option value='2001'>2001</option><option value='2000'>2000</option><option value='1999'>1999</option><option value='1998'>1998</option><option value='1997'>1997</option><option value='1996'>1996</option><option value='1995'>1995</option><option value='1994'>1994</option><option value='1993'>1993</option><option value='1992'>1992</option><option value='1991'>1991</option><option value='1990'>1990</option><option value='1989'>1989</option><option value='1988'>1988</option><option value='1987'>1987</option><option value='1986'>1986</option><option value='1985'>1985</option><option value='1984' selected='selected'>1984</option><option value='1983'>1983</option><option value='1982'>1982</option><option value='1981'>1981</option><option value='1980'>1980</option><option value='1979'>1979</option><option value='1978'>1978</option><option value='1977'>1977</option><option value='1976'>1976</option><option value='1975'>1975</option><option value='1974'>1974</option><option value='1973'>1973</option><option value='1972'>1972</option><option value='1971'>1971</option><option value='1970'>1970</option><option value='1969'>1969</option><option value='1968'>1968</option><option value='1967'>1967</option><option value='1966'>1966</option><option value='1965'>1965</option><option value='1964'>1964</option><option value='1963'>1963</option><option value='1962'>1962</option><option value='1961'>1961</option><option value='1960'>1960</option><option value='1959'>1959</option><option value='1958'>1958</option><option value='1957'>1957</option><option value='1956'>1956</option><option value='1955'>1955</option><option value='1954'>1954</option><option value='1953'>1953</option><option value='1952'>1952</option><option value='1951'>1951</option><option value='1950'>1950</option><option value='1949'>1949</option><option value='1948'>1948</option><option value='1947'>1947</option><option value='1946'>1946</option><option value='1945'>1945</option><option value='1944'>1944</option><option value='1943'>1943</option><option value='1942'>1942</option><option value='1941'>1941</option><option value='1940'>1940</option><option value='1939'>1939</option></select>年
            <select class="inp-sel"  name = 'form[m]' id = 'birthday_m' ><option value='0'>请选择</option><option value='01' selected='selected'>1</option><option value='02'>2</option><option value='03'>3</option><option value='04'>4</option><option value='05'>5</option><option value='06'>6</option><option value='07'>7</option><option value='08'>8</option><option value='09'>9</option><option value='10'>10</option><option value='11'>11</option><option value='12'>12</option></select>月
            <select class="inp-sel"  name = 'form[d]' id = 'birthday_d' ><option value=''>请选择</option><option value='01'>1</option><option value='02'>2</option><option value='03'>3</option><option value='04'>4</option><option value='05'>5</option><option value='06'>6</option><option value='07'>7</option><option value='08'>8</option><option value='09'>9</option><option value='10'>10</option><option value='11'>11</option><option value='12'>12</option><option value='13'>13</option><option value='14'>14</option><option value='15'>15</option><option value='16'>16</option><option value='17'>17</option><option value='18' selected='selected'>18</option><option value='19'>19</option><option value='20'>20</option><option value='21'>21</option><option value='22'>22</option><option value='23'>23</option><option value='24'>24</option><option value='25'>25</option><option value='26'>26</option><option value='27'>27</option><option value='28'>28</option><option value='29'>29</option><option value='30'>30</option><option value='31'>31</option></select>日
        </div>

        <div class="input-label">
            <label for="" class="label-text">星座：</label>
            <span class="txt" id="birthday_txt">摩羯座</span>
        </div>
        <div class="input-label">
            <label for="" class="label-text">生肖：</label>

            <select name="form[animal]" id="animal" class="inp-sel">

                <option value="0">选择</option>
                                <option value="1" >鼠</option>
                                <option value="2" >牛</option>
                                <option value="3" >虎</option>
                                <option value="4" >兔</option>
                                <option value="5" >龙</option>

                                <option value="6" >蛇</option>
                                <option value="7" >马</option>
                                <option value="8" >羊</option>
                                <option value="9" >猴</option>
                                <option value="10" >鸡</option>
                                <option value="11" >狗</option>

                                <option value="12" >猪</option>
                            </select>
        </div>
        <div class="input-label">
            <label for="" class="label-text">出生地：</label>
            <div id='sel_location_birth'></div></div>
        <script type="text/javascript">
            var ya_config1 = {'con_id': "sel_location_birth", 'step': 3, 'name1': "location_birth[prov]", 'name2': "location_birth[city]",
                'name3': "location_birth[town]", 'sel_value' : 0};
            ylmf_area.make_select( ya_config1 );
        </script>

        <div class="input-label">
            <label for="" class="label-text">现居住地：</label>
            <div id='sel_location'  class="input-label-con"><input name="location_eq_birth" type="checkbox" value="1" onclick="(this.checked ? $('#sel_location').hide() : $('#sel_location').show())" id="js_birth" />同出生地</div>
            <script type="text/javascript">
                var ya_config2 = {'con_id': "sel_location", 'step': 3, 'name1': "location[prov]", 'name2': "location[city]",
                    'name3': "location[town]", 'sel_value' : 200109};
                ylmf_area.make_select( ya_config2 );
            </script>
            
        </div>
        <div class="input-label">
            <label for="" class="label-text">自我简介：</label>

            <textarea id="introduce" name="form[introduce]" class="textarea"></textarea>
                    </div>
        <div class="input-label">
            <label for="" class="label-text">&nbsp;</label>
            <a href="javascript:;" onclick="S.validate($('#js_form_info'));return false;" class="circle-btn circle-btn-blue"><span>确 定</span></a>
        </div>
    </form>
    <script type="text/javascript">
        var setStarTxt = function(){
            var m = $("#birthday_m").val();
            var d = $("#birthday_d").val();
            $("#birthday_txt").html(Util.getStar(m,d));
            setAnimal();
        }
        setAnimal();
        setStarTxt();
        $("#birthday_y").bind("change",setStarTxt);
        $("#birthday_m").bind("change",setStarTxt);
        $("#birthday_d").bind("change",setStarTxt);
    </script>

</div>
<a href="javascript:;" class="btn-top" id="to_top"></a>
<script type="text/javascript">
	document.domain=window.location.host;
	$(function(){
		if(!parent.window.isFrame && parent.window.location.hash == ""){
			var href=window.location.href;
			window.location.href="<?php echo(Yii::app()->params['app']['host'])?>/index.php?r=setting/index&ac="+window.location.href.substring(href.indexOf("=")+1,href.length);
		}
	})
</script></body>
</html>
